<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tags.tld" prefix="s"%>
<%@taglib uri="/WEB-INF/dianning.tld" prefix="dianning"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="/css/top.css" rel="stylesheet" type="text/css" />
<link href="/css/foot.css" rel="stylesheet" type="text/css" />
<link href="/css/index.css" rel="stylesheet" type="text/css" />
<link href="/css/vip.css" rel="stylesheet" type="text/css" />
<link href="/css/avatar.css" rel="stylesheet" type="text/css" />
<link href="/css/validator.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/jquery_last.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/formValidator.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/formValidatorRegex.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/DateTimeMask.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/avatar.js"></script>
<script type="text/javascript" charset="utf-8" src="/js/popup.js"></script>
<link rel="shortcut icon" href="favicon.ico">
<link rel="icon" type="images/gif" href="animated_favicon1.gif" />
<title>点宁网[<dianning:webinfo type="area"/>分类信息]<dianning:webinfo type="area"/>免费发布信息<dianning:webinfo type="poweredby"/></title>
<meta name="Description" content="<dianning:webinfo type="area"/>分类信息网为您提供<dianning:webinfo type="area"/>分类信息，您可以免费发布和查询求职招聘,兼职,房屋出租,二手市场,生活服务,兼职,黄页等分类信息."/>
<meta name="Keywords" content="<dianning:webinfo type="area"/>免费发布信息, <dianning:webinfo type="area"/>分类信息, <dianning:webinfo type="area"/>信息港, <dianning:webinfo type="area"/>热线, <dianning:webinfo type="area"/>免费发布广告，<dianning:webinfo type="area"/>114"/>
</head>
<body>
<div class="bgtop">
<s:include value="/top.jsp" />
</div>

<div class="content">
<s:include value="/WEB-INF/jsp/user/left.jsp" />
	<div class="vipr">
	  <h2>修改个人信息</h2>
	  <ul class="viprheight">
<form name="save" id="save" method="post" action="userInfo.action">
<s:hidden name="action" value="save"/>
<DIV class=s_title>修改联系方式</DIV>
<DIV class=c></DIV>
<TABLE  class="grpic mt20" border=0 cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <td align="right" width="34%">用户名： </td>
    <td align="left"><s:property value="userInfo.username"/></td>
    </TR>
  <TR>
    <TD align=right><span class="red">*</span> 真实姓名：</TD>
    <TD align=left><s:textfield name="name" id="name" /><span id="nameTip"></span></TD>
</TR>
 <TR>
    <TD align=right><SPAN class=red>*</SPAN> 性 &nbsp; &nbsp;别： </TD>
    <TD align=left>
		<s:radio list="sexList" name="sex" listKey="key" listValue="value"></s:radio>
		 <span id="sexTip"></span>
	</TD>
 </TR>
  </TBODY></TABLE>
<DIV class=c></DIV>
<DIV class=s_title>修改头像</DIV>
<TABLE class="grpic mt20" border=0 cellSpacing=0 cellPadding=0>
  <TBODY>
  <TR>
    <TD width="22%" align=middle>
      <DIV id=previewimage>
	  <SPAN class=tx><img src="/avatar.action?uid=<s:property value="userSession.uid"/>&rnd=1" width="100" height="100" id="avatar"></SPAN>
	  </DIV>
	</TD>
    <TD width="20%" id="uploader">
	</TD>
	<TD width="58%">
	图片格式:GIF、JPG、JPEG、PNG,最适合尺寸100*100 
      像素
	</TD>
	</TR></TBODY></TABLE>
<DIV class=c></DIV>
<DIV class=s_title>修改资料</DIV>
<DIV class=c></DIV>
<TABLE  class="grpic mt20" border=0 cellSpacing=0 cellPadding=0>
  <TBODY>
  
  <TR>
    <TD width="34%" align=right><SPAN class=red>*</SPAN> 手 &nbsp; &nbsp;机： </TD>
    <TD align=left><s:textfield name="mobile" id="mobile" size="20"/><span id="mobileTip"></span></TD>
</TR>
  <TR>
    <TD align=right>QQ&nbsp; &nbsp;号： </TD>
    <TD colSpan=2><s:textfield name="qq" id="qq" size="20"/><span id="qqTip"></span></TD>
</TR>
  <TR>
    <TD align=right>座 &nbsp; &nbsp;机：</TD>
    <TD class=basetb align=left><s:textfield name="tel" id="tel" size="20"/><span id="telTip"></span></TD>
</TR>
  <TR>
    <TD align=right>&nbsp; 邮 &nbsp; &nbsp;箱： </TD>
    <TD><s:textfield name="email" id="email" size="20"/> <span id="emailTip"></span></TD>
</TR>
  <TR>
    <TD>&nbsp; </TD>
    <TD colSpan=2 align=left><INPUT id=btnSubmit class=grsub value=完成修改 type=submit name=btnSubmit />    </TD></TR></TBODY></TABLE>
<DIV class=c></DIV></FORM>
  </ul>
      <h3></h3>
    </div>
    </div>
<div class="content">
<s:include value="/foot.jsp" />
</div>
<script type="text/javascript">        
function createUploader(){            
	var uploader = new qq.FileUploader({
	element: document.getElementById('uploader'),
	action: '<s:property value="domain"/>/upPhoto.action?action=avatar',
	allowedExtensions:['jpg','gif','jpeg']
    });           
}
$(document).ready(function(){
	createUploader(); 
	$.formValidator.initConfig({formid:"save",errorfocus: true});
	$("#name").formValidator({onshow:"请输入真实姓名",onfocus: "2-4个字，只允许输入中文"}).regexValidator({ regexp: "^[\u4e00-\u9fa5]*$", onerror: "只能输入中文" }).regexValidator({ regexp: "^(.){2,4}$", onerror: "真实姓名就为2-4个字！" });
	$("#mobile").formValidator({onshow:"请输入手机号码",onfocus: "请输入手机号码"}).regexValidator({ regexp: "^(13[0-9]|14[0-9]|15[0-9]|18[0-9])\\d{8}$", onerror: "请输入正确手机号码,如:13802400240。" });
	$("#tel").formValidator({onshow:"电话可以为空",onfocus: "请输入电话号码",'empty': true,onempty:"电话可以为空"}).regexValidator({ regexp: "^([\\d-]{3,5})?(\\d){5,8}(-[\\d]{1,5})?(-[\\d]{1,5})?$", onerror: "请输入正确电话号码格式,如:58621888" });
	$("#qq").formValidator({onshow:"QQ可以为空",onfocus: "请输入QQ号",'empty': true,onempty:"QQ可以为空"}).regexValidator({ regexp: "^\\d*?$", onerror: "请输入正确QQ格式,如:123453" });
	$("#email").formValidator({onshow:"电子邮件可以为空",onfocus: "请输入电子邮件",'empty': true,onempty:"电子邮件可以为空"}).regexValidator({ regexp: "^\\w+([-+.]\\w+)*@[a-zA-Z0-9]{1}([-a-zA-Z0-9]{0,61}[a-zA-Z0-9]{1})?\\.[a-zA-Z0-9]+([.a-zA-Z0-9]+)*$", onerror: "请输入正确的邮件,如:myname@sina.com " });
	$(':radio[name="sex"]').formValidator({ tipid: "sexTip",onshow:"请选择性别",onfocus: "请选择性别" }).functionValidator({ fun: function(val, elem) { return $(':radio[name="sex"]:checked').length > 0; }, onerror: '请选择性别' });

});
</script>
</body>
</html>
